package com.jboost.hyk.common.mapper;

import java.util.List;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jboost.hyk.common.entity.BusinessKnowledgePoint;
import com.jboost.hyk.music.entity.MusicScore;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: 机构的知识点记录（订单）
 * @Author: cxn
 * @Date:   2022-10-24
 * @Version: V1.0
 */
public interface BusinessKnowledgePointMapper extends BaseMapper<BusinessKnowledgePoint> {

    List<MusicScore> pageScoreBy(Page<MusicScore> page, String name, String category3Id, String category2Id, String businessId);

    void releaseVersion(String kpId, String versionId);

    /**
     * 筛选出机构已购买的知识点
     * @param businessId
     * @param kpIds
     * @return
     */
    List<BusinessKnowledgePoint> listValidByKpIds(String businessId, String[] kpIds);

    List<BusinessKnowledgePoint> listByCourseSnapshotId(String businessId, String courseSnapshotId);

    List<BusinessKnowledgePoint> listByLibrarySnapshotId(String businessId, String librarySnapshotId);

    /**
     * 筛选出机构全部的知识点
     * @param businessId
     * @param kpIds
     * @return
     */
    List<BusinessKnowledgePoint> listAllByKpIds(String businessId, String[] kpIds);
}
